<table class="width100" id="datasort_edit">
	<tr class="filterTypeTitle">
	 	<td class="td-center"><label data-i18n="select.sort_way.searchSortName"></label></td>
	 	<td class="td-center"><label data-i18n="select.sort_way.searchSortWay"></label></td>
	 	<td class="td-center"><label data-i18n="select.sort_way.searchFilterOperate"></label></td>
	</tr>
	<% if (sorts.length>0){for (var n=0;n<sorts.length;n++){%>
	<tr>
		<td class="td-center">
			<select name="sortName" class="dfinput">
   				<%if(n==0){for (var i=0;i<sortCols.length;i++){%>
					<option value="0" data-i18n="common.choose"></option>
					<option value="<%=sortCols[i]%>" data-i18n="<%=tableName%>.<%=sortCols[i]%>" 
					<%=sorts[n].sortName==sortCols[i]?selected='selected':""%> ></option>	
				<%}}else{ for (var i=0;i<sortCols.length;i++){%>
					<option value="<%=sortCols[i]%>" data-i18n="<%=tableName%>.<%=sortCols[i]%>" 
					<%=sorts[n].sortName==sortCols[i]?selected='selected':""%> ></option>	
				<%}}%>
			</select>
		</td>
		<td class="td-center">
			<select name="sortWay" class="dfinput">
				<%if(n==0){%>
					<option value="0" data-i18n="common.choose"></option>
					<option value="ASC" data-i18n="select.sort_way.asc" <%=sorts[n].sortWay=="ASC"?selected='selected':""%>></option>
					<option value="DESC" data-i18n="select.sort_way.desc" <%=sorts[n].sortWay=="DESC"?selected='selected':""%>></option>
				<%}else{%>
					<option value="ASC" data-i18n="select.sort_way.asc" <%=sorts[n].sortWay=="ASC"?selected='selected':""%>></option>
					<option value="DESC" data-i18n="select.sort_way.desc" <%=sorts[n].sortWay=="DESC"?selected='selected':""%>></option>
				<%}%>			
			</select>
		</td>
		<td class="td-center">
			<div class="addsortway addItem " data-i18n="[title]common.and"></div>
			<%if(n>0){%>
				<div class="removesortway removeItem" data-i18n="[title]common.remove"></div>			
			<%}%>
		</td>
	</tr>
	<%}}else{%>
		<tr>
			<td class="td-center">
				<select name="sortName" class="dfinput">
					<option value="0" data-i18n="common.choose"></option>
	   				<%for (var i=0;i<sortCols.length;i++){%>
	   				<option value="<%=sortCols[i]%>" data-i18n="<%=tableName%>.<%=sortCols[i]%>"></option>
	   				<%}%>
	 			</select>
			</td>
			<td class="td-center">
				<select name="sortWay" class="dfinput">
					<option value="0" data-i18n="common.choose"></option>
					<option value="ASC" data-i18n="select.sort_way.asc"></option>
					<option value="DESC" data-i18n="select.sort_way.desc"></option>
				</select>
			</td>
			<td class="td-center">
				<div class="addsortway addItem" data-i18n="[title]common.and"></div>
			</td>
		</tr>
	<%}%>
</table>